/*---------------------------------------------------------------------*
 * api
 *---------------------------------------------------------------------*/

#include "lib_api.h"

/*---------------------------------------------------------------------*
 * api list define
 *---------------------------------------------------------------------*/

#ifdef QC_API_EN
void qc_mb_poll(qc_obj_type *obj)
{
	lib->qc_mb_poll(obj);
}
void qc_poll(qc_obj_type *obj)
{
	lib->qc_poll(obj);
}

void qc_obj_init(qc_obj_type *obj, qc_cmd_type *clist, uu8 cnum, uu8 stcnum)
{
	lib->qc_obj_init(obj, clist, cnum, stcnum);
}
void mqc_cmd_next(qc_obj_type *obj)
{
	lib->mqc_cmd_next(obj);
}
void mqc_cmd_clr(qc_obj_type *obj)
{
	lib->mqc_cmd_clr(obj);
}
uint8_t mqc_dyna_cmd_req(qc_obj_type *obj, qc_cmd_type *cmd)
{
	return lib->mqc_dyna_cmd_req(obj, cmd);
}
uint8_t mqc_stc_cmd_req(qc_obj_type *obj, uint8_t cmd_site, qc_cmd_type *cmd)
{
	return lib->mqc_stc_cmd_req(obj, cmd_site, cmd);
}
uint8_t mqc_stc_cmd_del(qc_obj_type *obj, uint8_t cmd_site)
{
	return lib->mqc_stc_cmd_del(obj, cmd_site);
}
uint8_t mqc_cmd_ready_num(qc_obj_type *obj)
{
	return lib->mqc_cmd_ready_num(obj);
}
uint8_t mqc_cmd_idle_num(qc_obj_type *obj)
{
	return lib->mqc_cmd_idle_num(obj);
}
void qc_exe_success(qc_obj_type *obj)
{
	lib->qc_exe_success(obj);
}
void qc_exe_fail(qc_obj_type *obj)
{
	lib->qc_exe_fail(obj);
}

void qc_rcv_byte(qc_obj_type *obj, uu8 dat)
{
	lib->qc_rcv_byte(obj, dat);
}
uint8_t qc_data_send(qc_obj_type *obj, void (*send)(uint8_t), uint8_t len)
{
	return lib->qc_data_send(obj, send, len);
}
void qc_send_end(qc_obj_type *obj)
{
	lib->qc_send_end(obj);
}
void qc_timer_handle(qc_obj_type *obj)
{
	lib->qc_timer_handle(obj);
}
void qc_package_send(qc_obj_type *obj, uu8 len)
{
	lib->qc_package_send(obj, len);
}
#endif

#ifdef MB_API_EN
void mb_poll(mb_obj_type *obj)
{
	lib->mb_poll(obj);
}
void mb_obj_init(mb_obj_type *obj)
{
	lib->mb_obj_init(obj);
}
void mb_package_send(mb_obj_type *obj)
{
	lib->mb_package_send(obj);
}
uint16_t mb_crc(uint8_t *pucFrame, uint16_t usLen)
{
	return lib->mb_crc(pucFrame, usLen);
}

uint8_t mb_data_send(mb_obj_type *obj, void (*send)(uint8_t), uint8_t len)
{
	return lib->mb_data_send(obj, send, len);
}
uint8_t mb_data_send_u32_fifo(mb_obj_type *obj, volatile uint32_t *pdat, uint8_t len)
{
	return lib->mb_data_send_u32_fifo(obj, pdat, len);
}
uint8_t mb_data_send_u16_fifo(mb_obj_type *obj, volatile uint16_t *pdat, uint8_t len)
{
	return lib->mb_data_send_u16_fifo(obj, pdat, len);
}
uint8_t mb_data_send_u8_fifo(mb_obj_type *obj, volatile uint8_t *pdat, uint8_t len)
{
	return lib->mb_data_send_u8_fifo(obj, pdat, len);
}
void mb_send_end(mb_obj_type *obj)
{
	lib->mb_send_end(obj);
}

void mb_data_rcv(mb_obj_type *obj, uint8_t dat)
{
	lib->mb_data_rcv(obj, dat);
}
void mb_data_rcv_u32_fifo(mb_obj_type *obj, volatile uint32_t *pdat, uint16_t len)
{
	lib->mb_data_rcv_u32_fifo(obj, pdat, len);
}
void mb_data_rcv_u16_fifo(mb_obj_type *obj, volatile uint16_t *pdat, uint16_t len)
{
	lib->mb_data_rcv_u16_fifo(obj, pdat, len);
}
void mb_data_rcv_u8_fifo(mb_obj_type *obj, volatile uint8_t *pdat, uint16_t len)
{
	lib->mb_data_rcv_u8_fifo(obj, pdat, len);
}
uint8_t mb_data_pre_rcv(mb_obj_type *obj)
{
	return lib->mb_data_pre_rcv(obj);
}
void mb_data_rcv_directly(mb_obj_type *obj, uint8_t dat)
{
	lib->mb_data_rcv_directly(obj, dat);
}
void mb_rtu_timer_run(mb_obj_type *obj)
{
	lib->mb_rtu_timer_run(obj);
}
void mmb_cmd_buff_init(mb_obj_type *obj, mb_cmd_buff_type *pBuff, uint8_t mbCBuffSize, uint8_t mbSCBuffSize)
{
	lib->mmb_cmd_buff_init(obj, pBuff, mbCBuffSize, mbSCBuffSize);
}
uint8_t mmb_os_stc_cmd_req(mb_obj_type *obj, uint8_t CmdSite, mb_cmd_buff_type *cmd)
{
	return lib->mmb_os_stc_cmd_req(obj, CmdSite, cmd);
}
uint8_t mmb_os_dyna_cmd_req(mb_obj_type *obj, mb_cmd_buff_type *cmd)
{
	return lib->mmb_os_dyna_cmd_req(obj, cmd);
}
uint8_t mmb_os_stc_cmd_del(mb_obj_type *obj, uint8_t CmdSite)
{
	return lib->mmb_os_stc_cmd_del(obj, CmdSite);
}
uint8_t mmb_stc_cmd_req(mb_obj_type *obj, uint8_t CmdSite, mb_cmd_buff_type *cmd)
{
	return lib->mmb_stc_cmd_req(obj, CmdSite, cmd);
}
uint8_t mmb_dyna_cmd_req(mb_obj_type *obj, mb_cmd_buff_type *cmd)
{
	return lib->mmb_dyna_cmd_req(obj, cmd);
}
uint8_t mmb_stc_cmd_del(mb_obj_type *obj, uint8_t CmdSite)
{
	return lib->mmb_stc_cmd_del(obj, CmdSite);
}
uint8_t mmb_cmd_ready_num(mb_obj_type *obj)
{
	return lib->mmb_cmd_ready_num(obj);
}
uint8_t mmb_cmd_idle_num(mb_obj_type *obj)
{
	return lib->mmb_cmd_idle_num(obj);
}
void mmb_cmd_clr(mb_obj_type *obj)
{
	lib->mmb_cmd_clr(obj);
}
#endif

#ifdef PID_API_EN
void IndPid(pid_type *pid)
{
	lib->IndPid(pid);
}

void PidClr(pid_type *pid)
{
	lib->PidClr(pid);
}
void PidDvClr(pid_type *pid)
{
	lib->PidDvClr(pid);
}
void PidOutWeaken(pid_type *pid, float Coef)
{
	lib->PidOutWeaken(pid, Coef);
}
void PidUpdate(pid_type *pid, uint16_t *ParTab, float DutyMin, float DutyMax)
{
	lib->PidUpdate(pid, ParTab, DutyMin, DutyMax);
}

uint8_t PidAutoSet(pid_tune_type *tune_obj)
{
	return lib->PidAutoSet(tune_obj);
}
void PidAutoSetStart(pid_type *pid, pid_tune_type *tune_obj)
{
	lib->PidAutoSetStart(pid, tune_obj);
}
void PidAutoSetExit(pid_tune_type *tune_obj)
{
	lib->PidAutoSetExit(tune_obj);
}

int32_t q_pid_update(q_pid_type *pid)
{
	return lib->q_pid_update(pid);
}
int32_t q_pid_cal(q_pid_type *pid)
{
	return lib->q_pid_cal(pid);
}
void q_pid_clr(q_pid_type *pid)
{
	lib->q_pid_clr(pid);
}
void q_pid_dv_clr(q_pid_type *pid)
{
	lib->q_pid_dv_clr(pid);
}
#endif

#ifdef PT_API_EN
float Pt100_ResToTemp(float m_Res)
{
	return lib->Pt100_ResToTemp(m_Res);
}
float Pt100_TempToRes(float m_Temp)
{
	return lib->Pt100_TempToRes(m_Temp);
}
void temp_cal_imap(TEMP_OBJ_Type *TempObj)
{
	lib->temp_cal_imap(TempObj);
}
void temp_cal_pbpk(TEMP_OBJ_Type *TempObj)
{
	lib->temp_cal_pbpk(TempObj);
}
float pt100_cal_pbpk(pt100_type *pt)
{
	return lib->pt100_cal_pbpk(pt);
}
float pt100_cal_imap(pt100_type *pt)
{
	return lib->pt100_cal_imap(pt);
}
#endif

#ifdef TC_API_EN
float tc_k_cal_pbpk(tc_cal_type *tc)
{
	return lib->tc_k_cal_pbpk(tc);
}
float tc_k_cal_imap(tc_cal_type *tc)
{
	return lib->tc_k_cal_imap(tc);
}
float tc_r_cal_pbpk(tc_cal_type *tc)
{
	return lib->tc_r_cal_pbpk(tc);
}
float tc_r_cal_imap(tc_cal_type *tc)
{
	return lib->tc_r_cal_imap(tc);
}
float tc_e_cal_pbpk(tc_cal_type *tc)
{
	return lib->tc_e_cal_pbpk(tc);
}
float tc_e_cal_imap(tc_cal_type *tc)
{
	return lib->tc_e_cal_imap(tc);
}
float tc_j_cal_pbpk(tc_cal_type *tc)
{
	return lib->tc_j_cal_pbpk(tc);
}
float tc_j_cal_imap(tc_cal_type *tc)
{
	return lib->tc_j_cal_imap(tc);
}
float tc_s_cal_pbpk(tc_cal_type *tc)
{
	return lib->tc_s_cal_pbpk(tc);
}
float tc_s_cal_imap(tc_cal_type *tc)
{
	return lib->tc_s_cal_imap(tc);
}
float tc_t_cal_pbpk(tc_cal_type *tc)
{
	return lib->tc_t_cal_pbpk(tc);
}
float tc_t_cal_imap(tc_cal_type *tc)
{
	return lib->tc_t_cal_imap(tc);
}
float tc_n_cal_pbpk(tc_cal_type *tc)
{
	return lib->tc_n_cal_pbpk(tc);
}
float tc_n_cal_imap(tc_cal_type *tc)
{
	return lib->tc_n_cal_imap(tc);
}
float tc_b_cal_pbpk(tc_cal_type *tc)
{
	return lib->tc_b_cal_pbpk(tc);
}
float tc_b_cal_imap(tc_cal_type *tc)
{
	return lib->tc_b_cal_imap(tc);
}
#endif

#ifdef TCTR_API_EN
void temp_box_ctr(temp_box_ctr_type *TempCtrPar)
{
	lib->temp_box_ctr(TempCtrPar);
}
#endif

#ifdef HTTR_API_EN
void HT_Control(HUMITEMP_CTR_PAR_Type *CtrPar)
{
	lib->HT_Control(CtrPar);
}
#endif

#ifdef GUS_API_EN
void dgus_poll(mb_obj_type *obj)
{
	lib->dgus_poll(obj);
}
void dgusii_poll(mb_obj_type *obj)
{
	lib->dgusii_poll(obj);
}
void vgus_poll(mb_obj_type *obj)
{
	lib->vgus_poll(obj);
}
void vgus_page_set(mb_obj_type *obj, uint16_t *page, void call_back(uint8_t, uint8_t))
{
	lib->vgus_page_set(obj, page, call_back);
}
void vgus_pv_read(mb_obj_type *obj, uint16_t *dat, uint16_t addr, uint16_t Len, void call_back(uint8_t, uint8_t))
{
	lib->vgus_pv_read(obj, dat, addr, Len, call_back);
}
void vgus_pv_write(mb_obj_type *obj, uint16_t *dat, uint16_t addr, uint16_t Len, void call_back(uint8_t, uint8_t))
{
	lib->vgus_pv_write(obj, dat, addr, Len, call_back);
}
#endif

/*---------------------------------------------------------------------*
 * EOF
 *---------------------------------------------------------------------*/
